Skip to content

Conversation

@siwei-zhang-work
Copy link
Contributor

This endpoint is introduced to support xy chart that has a non-time x-axis proposed in
#114

What it does

Introduce generic XY endpoint proposed in #114

@siwei-zhang-work siwei-zhang-work force-pushed the generic-xy branch 2 times, most recently from f7735fd to b6a1fbf Compare August 19, 2025 12:05
@bhufmann bhufmann self-assigned this Aug 19, 2025
Copy link
Contributor

@bhufmann bhufmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution. I reviewed and found a couples things to change.

format: int32
filter_query_parameters:
$ref: "#/components/schemas/RequestedFilterQueryParameters"
RequestedFilterQueryParameters:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RequestedFilterQueryParameters already exists in this file (line 3423) and doesn't need to be added again.

API.yaml Outdated
format: int32
filter_query_parameters:
$ref: "#/components/schemas/RequestedFilterQueryParameters"
RequestedFilterQueryParameters:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RequestedFilterQueryParameters already exists in this file (line 2902) and doesn't need to be added again.

$ref: "#/components/schemas/OutputElementStyle"
xValues:
xValuesDescription:
type: array
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not correct, I think. It's not an array. The swagger documentation needs to be updated for that and the API regenerated.

axisDomain:
$ref: "#/components/schemas/AxisDomain"
yValuesDescription:
type: array
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not correct, I think. It's not an array. The swagger documentation needs to be updated for that and the API regenerated.

API.yaml Outdated
xValuesDescription:
type: array
description: Series' X values
description: Series' X axis description
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comment as for API_proposed.yaml

description: Label for the axis
axisDomain:
$ref: "#/components/schemas/AxisDomain"
yValuesDescription:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comment as for API_proposed.yaml

This endpoint is introduced to support xy chart that
has a non-time x-axis proposed in
eclipse-cdt-cloud#114

Signed-off-by: Siwei Zhang <[email protected]>
@siwei-zhang-work
Copy link
Contributor Author

Fixed and created PR in incubator in: https://github.com/eclipse-tracecompass-incubator/org.eclipse.tracecompass.incubator/pull/215/files

bhufmann
bhufmann previously approved these changes Aug 25, 2025
Copy link
Contributor

@bhufmann bhufmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Thanks for the update.

properties:
type:
type: string
description: "Type of axis domain (e.g., 'categorical' or 'timeRange')"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

timeRange -> range ?

type:
type: string
description: Type of axis domain
AxisDomainTimeRange:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AxisDomainRange ?

API.yaml Outdated
properties:
type:
type: string
description: "Type of axis domain (e.g., 'categorical' or 'timeRange')"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

timeRange -> range ?

API.yaml Outdated
type:
type: string
description: Type of axis domain
AxisDomainTimeRange:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AxisDomainRange

type: string
description: Label for the axis
axisDomain:
$ref: '#/components/schemas/AxisDomain'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be oneOf { AxisDomainCategorical, AxisDomainRange }, either here or directly in AxisDomain definition?

Copy link
Contributor

@bhufmann bhufmann Aug 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@siwei-zhang-work I think if you change the swagger annotation for AxisDomain to the following, then it will achieve what Patrick suggests:

@Schema(description = "Domain of values supported on a chart axis. Can be either categorical or numeric range.", oneOf = {
        AxisDomainCategorical.class,
        AxisDomainRange.class
})

I uploaded the corresponding PR in the Trace Compass server code:
eclipse-tracecompass-incubator/org.eclipse.tracecompass.incubator#220

@bhufmann
Copy link
Contributor

@siwei-zhang-work I pushed a commit on top of your branch used to generate this PR to include the incubator update and the fixes that Patrick pointed out.

@bhufmann bhufmann requested a review from PatrickTasse August 27, 2025 14:08
Copy link
Contributor

@bhufmann bhufmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@siwei-zhang-work changes look good. Thanks!

@bhufmann bhufmann merged commit 2eee50f into eclipse-cdt-cloud:master Aug 27, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants